int[] b = Array.ConvertAll((int[])Enum.GetValues(typeof(TestEnum)), Convert.ToInt32);
int[] result = enumArray.Cast<int>().ToArray();